#ifndef __RESET_SERVER_H__
#define __RESET_SERVER_H__

#include <map>
#include <mutex>
#include <functional>
#include "Util/util.h"
#include "jsoncpp/json.h"
#include "Network/Buffer.h"

using namespace std;
using namespace Fdt;
class ResetServer{
public:
    static ResetServer *instance();
private:
    ResetServer();
    ~ResetServer();
    void RegistRPC();
    bool InitReset(const Json::Value &request, const Fdt::BufferMap::Ptr &inMap, Json::Value &response, Fdt::BufferMap::Ptr &outMap);
    /**
     * 重置设备配置文件中的wifi，设备名，密码
     * */
    bool resetConfig();
    bool WlanOpt();

private:
    static ResetServer *sm_resetServer;
    static mutex sm_instanceLock;
};

#endif